<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div>
        <ul id="one">
            <li><input type="checkbox"> 一级菜单1
                <ul id="two">
                    <li>
                        <input type="checkbox">二级菜单1
                        <ul id="three">
                            <li><input type="checkbox">三级菜单1</li>
                            <li><input type="checkbox">三级菜单2</li>
                            <li><input type="checkbox">三级菜单3</li>
                        </ul>
                    </li>
                </ul>
            </li>
            <!-- 2 -->
            <li><input type="checkbox"> 一级菜单2
                <ul id="two2">
                    <li>
                        <input type="checkbox">二级菜单2
                        <ul id="three2">
                            <li><input type="checkbox">三级菜单1</li>
                            <li><input type="checkbox">三级菜单2</li>
                            <li><input type="checkbox">三级菜单3</li>
                        </ul>
                    </li>
                </ul>
            </li>
            <!-- 3 -->
            <li class="one"><input type="checkbox"> 一级菜单3
                <ul id="two3">
                    <li>
                        <input type="checkbox">二级菜单3
                        <ul id="three3">
                            <li><input type="checkbox">三级菜单1</li>
                            <li><input type="checkbox">三级菜单2</li>
                            <li><input type="checkbox">三级菜单3</li>
                        </ul>
                    </li>
                </ul>
            </li>

        </ul>
    </div>
    <script>
        //一级菜单节点
        var one = document.getElementById('one')
        var oneList = one.getElementsByTagName('li')
        var two = document.getElementById('two')
        var three = document.getElementById('three')


        //一级菜单
        one.onclick = function () {
            console.log(11);


        }



    </script>

</body>
<style>
    #two2 {
        display: none;
    }

    #two3 {
        display: none;
    }

    #two {
        display: none;
    }

    #three {
        display: none;
    }
</style>

</html>